/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-04-19
 * Time:23:54
 */
//静态的成员变量和静态的成员方法>实例的成员变量和成员方法>构造方法
class X{
    Y y=new Y();//2
    public X(){
        System.out.print("X");//3
    }
}
class Y{
    public Y(){
        System.out.print("Y");//2和4
    }
}
public class Z extends X{
    Y y=new Y();//4
    public Z(){// 1
        System.out.print("Z");//5
    }
    public static void main(String[] args) {
        new Z();
//        System.out.println("Hello");
    }
}